import request from '@/utils/request'
/**
 * get list ?
 * @param params {*}
 */
export function _get (params) {
    return request({
        url: '/warehouse/getWarehouseByPage',
        method: 'get',
        params: params
    })
}

export function _getWarehouseDeliveryRecordByPage (params) {
    return request({
        url: '/warehouse/getWarehouseDeliveryRecordByPage',
        method: 'get',
        params: params
    })
}

// 獲取廚房進貨記錄
export function _getWarehouseInStoreRecordByPage (params) {
    return request({
        url: '/warehouse/getWarehouseInStoreRecordByPage',
        method: 'get',
        params: params
    })
}

export function _getAllWarehouse (params) {
  return request({
    url: '/warehouse/getAllWarehouse',
    method: 'get',
    params: params
  })
}
/**
 * get row ?
 * @param params {*}
 */
 export function _find (params) {
    return request({
        url: '/warehouse/getWarehouseByPage',
        method: 'get',
        params: params
    })
}

// 新增數據
export function _post (params) {
    return request({
        url: '/warehouse/addWarehouse',
        method: 'post',
        data: params
    })
}
// 修改數據
export function _put (id, params) {
    return request({
        url: '/warehouse/editWarehouse?idWar=' + id,
        method: 'put',
        data: params
    })
}
// 刪除數據
export function _delete (params) {
    return request({
        url: '/warehouse/addWarehouse',
        method: 'delete',
        params: params
    })
}

export function _getWarehouseInStoreRecord (idWar) {
  return request({
    url: '/warehouse/getWarehouseInStoreRecord?idWar=' + idWar,
    method: 'get'
  })
}

export function _getWarehouseDeliveryRecord (idWar) {
  return request({
    url: '/warehouse/getWarehouseDeliveryRecord?idWar=' + idWar,
    method: 'get'
  })
}

export function getWarehouseOutOfStockGoods (params) {
  return request({
    url: '/warehouse/getWarehouseOutOfStockGoods',
    method: 'get',
    params: params
  })
}

export function getWarehouseReturnRecord (params) {
  return request({
    url: '/warehouse/getWarehouseReturnRecord',
    method: 'get',
    params: params
  })
}
